package com.tao.graduation.Service.Impl;

import com.tao.graduation.Dao.DoctorDao;
import com.tao.graduation.Pojo.Appointment;
import com.tao.graduation.Pojo.Doctor;
import com.tao.graduation.Pojo.Hospitalization;
import com.tao.graduation.Pojo.Seek;
import com.tao.graduation.Service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorDao doctorDao;

    @Override
    public Doctor queryDoctorById(Integer id) {
        return doctorDao.queryDoctorById(id);
    }

    @Override
    public List<Map<Object,Object>> queryCurrentAppointment(Integer doctorId, String today,Integer index,Integer LIMIT) {
        return doctorDao.queryCurrentAppointment(doctorId,today,index,LIMIT);
    }

    @Override
    public int queryPatientIdByCertId(String certId) {
        return doctorDao.queryPatientIdByCertId(certId);
    }


    @Override
    public int insertSeek(Seek seek) {
        return doctorDao.insertSeek(seek);
    }

    @Override
    public int Prescribe(String drugs, String days, Integer patientId) {
        return doctorDao.Prescribe(drugs, days, patientId);
    }

    @Override
    public int insertHospitalization(Hospitalization hospitalization) {
        return doctorDao.insertHospitalization(hospitalization);
    }

    @Override
    public int SuccessSeek(Integer patientId, Integer doctorId, String state,String days) {
        return doctorDao.SuccessSeek(patientId, doctorId, state,days);
    }

    @Override
    public List<Map<Object, Object>> querySeekJiLu(Integer doctorId,Integer index,Integer LIMIT) {
        return doctorDao.querySeekJiLu(doctorId,index,LIMIT);
    }

    @Override
    public int querySeekJiLuCount(Integer doctorId) {
        return doctorDao.querySeekJiLuCount(doctorId);
    }

    @Override
    public List<Map<Object, Object>> searchJiLu(Integer patientId) {
        return doctorDao.searchJiLu(patientId);
    }


}
